import request from '@/utils/request'

// 查询调拨入库单列表
export function listAdjustIn(query) {
  return request({
    url: '/bill/adjustIn/list',
    method: 'get',
    params: query
  })
}

// 查询调拨出库单列表
export function selectAdjustInBillForPrint(query) {
  return request({
    url: '/bill/adjustIn/selectAdjustInBillForPrint',
    method: 'get',
    params: query
  })
}


// 查询调拨入库单详细
export function getAdjustIn(id) {
  return request({
    url: '/bill/adjustIn/' + id,
    method: 'get'
  })
}

// 新增调拨入库单
export function addAdjustIn(data) {
  return request({
    url: '/bill/adjustIn',
    method: 'post',
    data: data
  })
}

// 修改调拨入库单
export function updateAdjustIn(data) {
  return request({
    url: '/bill/adjustIn',
    method: 'put',
    data: data
  })
}

// 删除调拨入库单
export function delAdjustIn(id) {
  return request({
    url: '/bill/adjustIn/' + id,
    method: 'delete'
  })
}

// 取消调拨入库单
export function cancelAdjustIn(data) {
  return request({
    url: '/bill/adjustIn/cancel',
    method: 'put',
    data: data
  })
}

// 取消调拨入库单
export function confirmCancelAdjustIn(data) {
  return request({
    url: '/bill/adjustIn/confirmCancel',
    method: 'put',
    data: data
  })
}

// 完成调拨入库单
export function completeAdjustIn(data) {
  return request({
    url: '/bill/adjustIn/complete',
    method: 'put',
    data: data
  })
}

// 确认调拨入库单
export function confirmAdjustIn(data) {
  return request({
    url: '/bill/adjustIn/confirm',
    method: 'put',
    data: data
  })
}




// 查询调拨入库单明细列表
export function listAdjustInDetail(query) {
  return request({
    url: '/bill/adjustInDetail/list',
    method: 'get',
    params: query
  })
}

// 查询调拨入库单明细详细
export function getAdjustInDetail(id) {
  return request({
    url: '/bill/adjustInDetail/' + id,
    method: 'get'
  })
}

// 新增调拨入库单明细
export function addAdjustInDetail(data) {
  return request({
    url: '/bill/adjustInDetail',
    method: 'post',
    data: data
  })
}

// 修改调拨入库单明细
export function updateAdjustInDetail(data) {
  return request({
    url: '/bill/adjustInDetail',
    method: 'put',
    data: data
  })
}

// 删除调拨入库单明细
export function delAdjustInDetail(id) {
  return request({
    url: '/bill/adjustInDetail/' + id,
    method: 'delete'
  })
}
